@extends('layouts.admin')
@push('morecss')
    <link href="{{ asset('/vendor/AdminInspinia/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css') }}"
          rel="stylesheet">
@endpush

@push('morescript')
    <script type="application/javascript">
        let page_params = {
            @can('admin.wxcardreceive.index')
            url_list: '{{ route('admin.wxcardreceive.index') }}',
            @endcan
            @can('admin.wxcardreceive.updatecode')
            url_updatecode: '{{ route('admin.wxcardreceive.updatecode') }}',
            @endcan
            @can('admin.wxcardreceive.disable')
            url_disable: '{{ route('admin.wxcardreceive.disable') }}',
            @endcan
        }
    </script>
    <!-- require page js -->
    <script src="{{ mix('js/admin/wxcardreceive_index.js') }}"></script>
@endpush
@section('content')
    <div class="wrapper wrapper-content animated fadeInRight ecommerce">
        <div class="ibox-content m-b-sm border-bottom">
            <div class="row">
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="control-label" for="keyword">微信卡券ID</label>
                        <input type="text" id="card_id" name="card_id" v-model="searchParams.card_id"
                               placeholder="请输入微信卡券ID"
                               class="form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <label class="control-label" for="user_card_code">code序列号</label>
                        <input type="text" id="user_card_code" name="user_card_code" v-model="searchParams.user_card_code"
                               placeholder="请输入领券用户code"
                               class="form-control">
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="control-label" for="keyword">用户openId</label>
                        <input type="text" id="openid" name="openid" v-model="searchParams.openid"
                               placeholder="请输入领券用户openid"
                               class="form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <label class="control-label" for="keyword">场景值</label>
                        <input type="text" id="outer_str" name="outer_str" v-model="searchParams.outer_str"
                               placeholder="请输入领券场景值"
                               class="form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <label class="control-label" for="product_name">&nbsp;&nbsp;</label>
                        <div>
                            <button class="btn btn-primary" type="button" v-on:click="query">
                                <i class="fa fa-search"></i>
                                搜索
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="toolbar" class="col-sm-5" style="width: 300px;">
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox">
                    <div class="ibox-content">
                        <table id="table" data-classes="table table-no-bordered">
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--卡券CODE设置-->
    <div class="ibox-content" id="box-updatecode" style="display: none">
        <form class="form-horizontal m-t" method="post" action="">
            <div class="form-group">
                <label class="col-sm-4 control-label">CODE</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"
                           v-model="codeData.code">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-4 col-sm-offset-4">
                    <button class="btn btn-primary btn-sub" type="button" v-on:click="saveCode">提交</button>
                </div>
            </div>
        </form>
    </div>
@endsection